
const URL = process.env.PUBLIC_URL;
const markDownList = [
    {
        label:'自定义hooks',
        value:`${URL}/md/自定义hooks.md`
    },
    {
        label:'复合组件',
        value:`${URL}/md/复合组件.md`
    },
    {
        label:'类组件获取dom',
        value:`${URL}/md/类组件获取dom.md`
    }
]



export const getMarkDown = async (label)=>{
    const file=  markDownList
        .filter(v=>v.label===label)
        .map(v=>v.value)[0];
    const text = await fetch(file);

    return await text.text();
}